class Admin::PointConfigsController < ApplicationController
  # GET /point_configs
  # GET /point_configs.xml
  def index
    @point_configs = PointConfig.find(:all)
  end

  # GET /point_configs/1
  # GET /point_configs/1.xml
  def show
    @point_config = PointConfig.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @point_config }
    end
  end

  # GET /point_configs/new
  # GET /point_configs/new.xml
  def new
    @point_config = PointConfig.new
  end
  # GET /point_configs/1/edit
  def edit
    @point_config = PointConfig.find(params[:id])
  end

  # POST /point_configs
  # POST /point_configs.xml
  def create
    @point_config = PointConfig.new(params[:point_config])

      if @point_config.save
        flash[:notice] = 'PointConfig was successfully created.'
        redirect_to(@admin_point_config) 
      else
        render :action => "new" 
      end
  end

  # PUT /point_configs/1
  # PUT /point_configs/1.xml
  def update
    @point_config = PointConfig.find(params[:id])

      if @point_config.update_attributes(params[:point_config])
        flash[:notice] = 'PointConfig was successfully updated.'
        redirect_to(admin_point_configs_url) 
      else
        render :action => "edit" 
      end
  end

  # DELETE /point_configs/1
  # DELETE /point_configs/1.xml
  def destroy
    @point_config = PointConfig.find(params[:id])
    @point_config.destroy

       redirect_to(admin_point_configs_url) 
  end
end
